package com.ss.bilibili_online.controller;

import com.ss.bilibili_online.repository.DataRepository;
import com.ss.bilibili_online.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@RestController
public class DataController {
    @Autowired
    private DataService dataService;

    @RequestMapping("getDataE/{type}/{counts}")
    public List getDataE(@PathVariable("type") String type,@PathVariable("counts") String counts){
        List arrayList = dataService.getDateE(type,counts);
       // List arrayList = new ArrayList();
      //  arrayList = dataRepository.queryOnlineCount();
        return arrayList;
    }

}
